package com.xtedu.examproject.dao.base;

import com.xtedu.examproject.entity.Teacher;
import com.xtedu.examproject.util.PageHelper;

import java.sql.SQLException;
import java.util.List;

public interface TeacherDao extends BaseDao<Teacher>{
    //获取所有非用户老师
    List<Teacher> findNonUserTeacher() throws Exception;

    //根据课程id获取老师、
    List<Teacher> findTeacherByCourseId(int courseId) throws Exception;


    //根据id来删除老师
    public boolean deleteTeacherId(int teacherId) throws Exception;
    //查找所有老师（分页）
    public PageHelper findAllByPage(int pageindex, int pagesize) throws Exception;
    //根据id查询老师（分页）
    public PageHelper findPageIdByTeacher(int teacherId, int pageIndex, int pageSize) throws SQLException;
    //根据老师名称查询老师(分页)
    public PageHelper findPageNameByTeacher(String teacherName, int pageIndex, int pageSize) throws SQLException;
    //根据电话号码查询老师（分页）
    public PageHelper findPagePhoneByTeacher(String phone, int pageIndex, int pageSize) throws SQLException;
    //根据id来查询老师信息
    public boolean updateTeacher(Teacher teacher) throws Exception;
    //根据老师类型查询老师
    public PageHelper findTeacherByType(String typeName, int pageIndex, int pageSize) throws Exception;
}
